package fun.chutianshu.springsecurity_03.controller;

import fun.chutianshu.springsecurity_03.entity.SysPermissionRole;
import fun.chutianshu.springsecurity_03.service.SysPermissionRoleService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 权限角色表(SysPermissionRole)表控制层
 *
 * @author makejava
 * @since 2021-05-25 07:30:26
 */
@RestController
@RequestMapping("sysPermissionRole")
public class SysPermissionRoleController {
    /**
     * 服务对象
     */
    @Resource
    private SysPermissionRoleService sysPermissionRoleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne/{id}")
    public SysPermissionRole selectOne(@PathVariable(name="id") Long id) {
        return this.sysPermissionRoleService.queryById(id);
    }

}